﻿using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace HMI.Tool
{
    public class SqlSugarHelper
    {
        public SqlSugarClient db { get; set; }
        public SqlSugarHelper() {
            db = new SqlSugarClient(new ConnectionConfig()
            {
                ConnectionString = "Data Source=data.db;Version=3",
                DbType = SqlSugar.DbType.Sqlite,         //必填, 数据库类型
                IsAutoCloseConnection = true,       //默认false, 时候知道关闭数据库连接, 设置为true无需使用using或者Close操作
                InitKeyType = InitKeyType.SystemTable
            }
          );
        }
    }
}
